<%--
  Created by IntelliJ IDEA.
  User: Administrator
  Date: 2021/4/12
  Time: 14:23
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<html>
<head>
    <link href="../../static/css/bootstrap.min.css?v=3.3.6" rel="stylesheet">
    <link href="../../static/css/font-awesome.css?v=4.4.0" rel="stylesheet">
    <title>Title</title>
    <style>
        td{
            text-align: center;
        }
        tr:not(:last-child) td:nth-child(1){
            padding-top:17px !important;
            background-color: #ced5bd;
        }

        #tab{
            margin-top: 60px;
            width: 600px;
        }
        #quanbu{
            position: absolute;
            left: 600px;
            width: 500px;
        }
        #type{
            position: absolute;
             top: 230px;
            left: 410px;
        }
        #button{
            position: absolute;
            top: 240px;
        }
        #button2{
            position: absolute;
            left: 400px;
        }
        button{
        width: 100px;
            height: 50px;
        }
    </style>
</head>
<body>
<form action="user?id=${sessionScope.user.id}" method="post">
    <div class="ibox-content" id="quanbu">
        <div class="row">
            <div class="col-sm-12">
                <form role="form">
                    <div class="form-group">
                        <h3 style="text-align: center">修改用户信息</h3>
                        <input type="hidden" class="form-control" value="updateUser" name="opr"/>
                        用户名:
                        <input type="text" placeholder="请输入您要修改的用户姓名" name="loginName" value="${sessionScope.user.loginName}" class="form-control"style="height:50px

"  >
                    </div>
                    <div class="form-group">
                         真实姓名:
                        <input type="text" placeholder="请输入密码" name="userName"  value="${sessionScope.user.userName}" class="form-control" style="height: 50px">
                    </div>


                    <input type="radio"  id="sex1" value="1" class="custom-radio" name="sex"/>男
                    <input type="radio" id="sex2" value="0" class="custom-radio" name="sex"/>女
                    <br/>
                    <div id="type">
                        <input type="radio"  id="types" value="1" class="custom-radio" name="type"/>管理员
                        <input type="radio" id="types2" value="0" class="custom-radio" name="type"/>用户
                    </div>

                    <div id="button">
                        <br/> <br/> <br/>
                        <button type="submit" class="btn btn-primary" onclick="update()">提交</button>
                        <button id="button2" type="reset" class="btn btn-primary" onclick="quxiao()">取消</button>
                    </div>
                </form>
            </div>
        </div>
    </div>
</form>

<!-- 自定义js -->
<script src="../../static/js/jquery.min.js?v=2.1.4"></script>
<script src="../../static/js/bootstrap.min.js?v=3.3.6"></script>
<script>

    $(function () {

        if ("${"sessionScope.user.sex"}"=="1"){
            $("#sex1").attr("checked","checked")
        }else{
            $("#sex2").attr("checked","checked")
        }
        if ("${sessionScope.user.type}"=="1"){
            $("#types").attr("checked","checked")
        }else{
            $("#types2").attr("checked","checked")
        }
    })

    function quxiao(){
        location.href="user?opr=userlist";
    }

    
</script>
</body>
</html>
